> number<-5
> if(number<5){
+ print('number is smaller than 5')
+ }else if(number>5){
+ print('number is bigger than 5')
+ }else{
+ print('number is 5')
+ }
[1] "number is 5”
> number<-3
> if(number<5){
+ print('number is smaller than 5')
+ }else if(number>5){
+ print('number is bigger than 5')
+ }else{
+ print('number is 5')
+ }
[1] "number is smaller than 5"
> comparedTo5<-function(number){
+ if(number<5){
+ print('number is smaller than 5')
+ }else if(number>5){
+ print('number is bigger than 5')
+ }else{
+ print('number is 5')
+ }
+ }
> comparedTo5(10)
[1] "number is bigger than 5"
> comparedTo5(3)
[1] "number is smaller than 5"
#을 사용하여 주석 표시한다.